package com.shawn.server.service;

import com.shawn.dubbo.api.UserApi;
import com.shawn.model.vo.HXUserVo;
import com.shawn.model.entity.User;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class HXService {

    @DubboReference
    private UserApi userApi;


    public HXUserVo getHXAccount(Long userId) {
        User user = userApi.findById(userId);
        HXUserVo hxUserVo = new HXUserVo();
        hxUserVo.setUsername(user.getHxUser());
        hxUserVo.setPassword(user.getHxPassword());
        return hxUserVo;
    }
}
